var routeExtentFlag = false;
var routeTimeFlag = false;

// $("#routeExceptionDiv0").find(".fileinput-upload-button")[0].css("display", "none");
// $("#routeExceptionDiv0").find(".fileinput-upload-button")[1].css("display", "none");

$("#routeExceptionBtn0").click(() => {
    var len = $("#routeExceptionDiv0").find(".file-caption-name").length;

    var title0 = $("#routeExceptionDiv0").find(".file-caption-name")[0].title;
    var title1 = $("#routeExceptionDiv0").find(".file-caption-name")[1].title;
    routeExtentFlag = true;

    if (title0 != "" && title1 != "") {
        for (let i = 0; i < len; i++) {
            $("#routeExceptionDiv0").find(".fileinput-upload")[i].click();
        }
    } else if (title0 == "" && title1 == "") {
        warningAlert("请选择轨迹点文件和轨迹范围文件");
    } else if (title0 == "" && title1 != "") {
        warningAlert("请选择轨迹点文件");
    } else if (title0 != "" && title1 == "") {
        warningAlert("请选择轨迹范围文件");
    }

})


$("#routeExceptionBtn1").click(() => {
    routeTimeFlag = true;

    var len = $("#routeExceptionDiv1").find(".fileinput-upload").length;

    var title0 = $("#routeExceptionDiv1").find(".file-caption-name")[0].title;
    var title1 = $("#routeExceptionDiv1").find(".file-caption-name")[1].title;

    if (title0 != "" && title1 != "") {
        for (let i = 0; i < len; i++) {
            $("#routeExceptionDiv1").find(".fileinput-upload")[i].click();
        }
    } else if (title0 == "" && title1 == "") {
        warningAlert("请选择轨迹点文件和轨迹范围文件");
    } else if (title0 == "" && title1 != "") {
        warningAlert("请选择轨迹点文件");
    } else if (title0 != "" && title1 == "") {
        warningAlert("请选择轨迹范围文件");
    }

})